package com.gjszn.kh.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.gjszn.kh.model.User;
import com.gjszn.kh.model.UserVO;

public interface UserMapper {
	
	int selectId();
	
	int deleteByPrimaryKey(@Param("id") Integer id, @Param("member") String member);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);
    
    int updateForDeleted(int id);
    
    User selectByCID(@Param("CID")String CID);
    
    User selectByPhone(@Param("phone")String phone);
    
    //List<User> selectForPageByMember(Map<String, Object> map);
    
    List<UserVO> selectForPageByMember(Map<String, Object> map);
    int selectForPageByMemberOfTotal(Map<String, Object> map);
    
    /**
     * 查询有多少条数据
     * 如果member=null，则查询全部
     * 
     * @param member
     * @return int
     */
    int selectTotal(@Param("member")String member);
}
